package com.yjz.study.arouter;

import android.content.Context;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.facade.service.DegradeService;

/**
 * 作用 : 页面降级策略(路由错误时，通过改降级策略，跳转到统一的错误页面中)
 * 作者 : yjz
 * 时间 : 2024/10/24 15:36
 */
@Route(path = ARouterLogic.Service.DEGRADE)
public class DegradeServiceImpl implements DegradeService {

    @Override
    public void onLost(Context context, Postcard postcard) {
        ARouterLogic.INSTANCE.navigation(ARouterLogic.Path.DEGRADE_GLOBAL_PATH);
    }

    @Override
    public void init(Context context) {

    }
}
